package com.module.sysconfig.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.module.sysconfig.dao.SfbzbMapper;
import com.module.sysconfig.service.SfbzbService;
import com.support.cache.annotation.CacheEvict;
import com.support.cache.annotation.Cacheable;
import com.support.cache.annotation.KeyMode;
import com.support.jdbc.Page;

@Service
public class SfbzbServiceImpl implements SfbzbService{
	
	@Autowired
	private SfbzbMapper sfbzbMapper;
	
	/**
	 * 添加收费标准
	 */
	@CacheEvict(key="ALL_SFBZB")
	public void saveSfbzb(Map<String, String> paramsMap) 
	{
		sfbzbMapper.saveSfbzb(paramsMap);
	}

	/**
	 * 收费标准的删除
	 */
	@CacheEvict(key="ALL_SFBZB")
	public void delSfbzb(Long ID) 
	{
		sfbzbMapper.delSfbzb(ID);
	}

	/**
	 * 收费标准的修改
	 */
	@CacheEvict(key="ALL_SFBZB")
	public void updateSfbzb(Map<String,String> paramsMap) 
	{
		sfbzbMapper.updateSfbzb(paramsMap);
	}

	/**
	 * 收费标准列表查询
	 */
	@Cacheable(expire=10,keyMode=KeyMode.ALL,key="FJPZB")
	public List<Map<String, String>> queryRecordSfbzb(Page<?> page) 
	{
		return sfbzbMapper.queryRecordSfbzb(page);
	}

	/**
	 * ID查询收费标准
	 */
	@Cacheable(key="ALL_SFBZB", keyMode=KeyMode.KEY_ONLY)
	public Map<String, String> querySfbzb(Long ID) 
	{
		return sfbzbMapper.querySfbzb(ID);
	}

	
}
